<?php if ( ! defined('BASEPATH')) exit('No direct script access allowed');

class Commodity extends CI_Controller {

	function __construct()
	{
		parent::__construct();
		$this->load->database();
		$this->load->model('commodity/commodity_model');
	}
	
	public function index(){
		$this->search();
	}
	
	public function search(){
		$this->load->view('common/header');
		$list = $this->commodity_model->searchList();
		$this->load->view('commodity/list1', array('list'=>$list));
		$this->load->view('common/footer');
	}
	
	public function detail($sku_code){
		$this->load->view('common/header');
		$detail = $this->commodity_model->search_detail($sku_code);
		$this->load->view('commodity/detail', array('detail'=>$detail));		
		$this->load->view('common/footer');
	}
	
}

